Three commands on the File menu are always active— Quit, Page Setup…, and Print…. The Close command is active when either the Julian Date window or the Mayan Correlations window is in front (active). Other commands are visible but inactive. They are there for desk accessories.
4.1.1 Quit
The Quit command saves window size and position information, Mayan correlation choice (see § 4.4.6 below), holiday selections, and print records, then quits the program.
4.1.2 Page Setup Main… or Page Setup JDate…
This command brings up the standard Page Setup dialog for the print manager. InterCal uses and stores two print records, one for each window. (This is done because the main window is best printed in landscape mode, while the date window is best printed in portrait mode.) The name of this command changes depending on which window is active, to remind you of which record you are affecting. If the date window is active, the command reads Page Setup JDate…, otherwise it reads Page Setup Main…. After your initial setting up, it is unlikely you will ever need this command unless you switch printers.
4.1.3 Print Main… or Print JDate…
The Print… command’s name on the menu is changed to either Print Main … or Print JDate…, depending on whether the date window is active. The Print Main… command brings up a slightly non-standard print dialog. A check box has been appended which is explained in the following paragraph. The main window must be printed in landscape mode in order to fit on one 8.5 by 11 page. Depending on your printer and driver, you may also need to scale the print (using the Page Setup command) to 90% or 95% of full size. The Print JDate… command brings up the standard print dialog to print the date window.
The added check box, “Color Printer”, appears when you select Print Main…. (The date window has no color in it, and so InterCal doesn’t care whether or not you have a color printer when printing the date window.) Remember that holidays are highlighted in color on a color monitor and using fill patterns on a monochrome monitor. InterCal does the same thing for printers. The problem is that there appears to be no way for an executing program to know whether or not the chosen printer has color capability and is operating in color mode. InterCal relies on the user to specify this information. (Executing programs can detect whether or not the printer driver is color QuickDraw aware. If it is not, then the printer must be black-and-white or at least operating in black-and-white mode. But if it is, the printer might still be black-and-white.)
InterCal stores the user’s choices for this check box, and always presents the most recent choice as the default. If you have chosen a different printer between print requests, this may not be appropriate.
The following differences exist between what you see on the screen and what is printed:
1) There is no inversion (equivalent to reverse video on the screen) on many printers, so the rules for highlighting are changed for printing. Instead of having the highest priority (as it does on the screen), selection has the lowest priority. Therefore, the selected date will appear in black and white reverse video on the printout only if it is not today’s date, not a highlighted holiday, and only if your printer supports inversion.
2) The month and year incrementing/decrementing arrows are not printed for linear calendars, and the radio buttons and check boxes at the right side of the Mayan controls do not print.
4.2. Edit Menu
The Edit menu is normally inactive. It is provided primarily for desk accessories. However, it automatically becomes active when the user edits any of the editable text fields such as the Julian Day in the Date Window. At that time, the standard edit commands are activated.
4.3. Primary and Secondary Menus
The next two menus are labeled Primary and Secondary. These menus are used to set the calendar systems to be displayed in the main window. The options available in both menus are the implemented calendars, plus a choice of None for the secondary system.
You can change the primary system at any time. The presently-selected primary system is deactivated in the menu, but all other choices are available. If you select as the new primary system a calendar which is currently the secondary one, the program obeys your command and automatically resets the secondary system to “None”.
When you change primary systems, the entire main window is redrawn with displayed date controls updated to reflect the displayed date in the new primary system. Of course, displayed date will be present somewhere in the new month display. Thus switching primary systems will not transfer you very far in time. Since selected date and displayed date are equal if selected date was visible in the month display before switching, selected date would still be visible after the switch.
The secondary calendar system can also be changed at any time. (It is set to “None” at program startup.) If there is a secondary system active, each day of the displayed month has its corresponding date in the secondary system written in its box. This feature enables direct comparison of dates in two separate calendar systems, and is one of the primary features for which InterCal was written.
Just as any implemented system can be the primary system, any other system can be the secondary system. The program prevents you (by disabling menu choices) from selecting the current primary system or the current secondary system as the new secondary system. [However, see Reverse Calendars under the Options menu (§4.4.5)].
Switching secondary systems does not alter most of the main window. Only the “fine print” in each day’s box changes.
4.4. The Options Menu
4.4.1. Show Date Window
This menu option is enabled whenever the date window is not visible, either because it is not open or because it is completely hidden behind another window. This window has an editable text field showing the Julian Day of selected date. So the user can change the selected date to any value which does not trigger the text verification code. (That code is designed to prevent entering such a large value that arithmetic overflow would occur and invalidate all calculations.) It does not matter whether or not selected date is presently being displayed in the main window. While editing the Julian Day field, the Escape, Return, Tab, and Enter keys work exactly as in the year text box in the main window.
Below the Julian Day is a table showing the selected date in all implemented calendar systems. Editing the Julian Day field sets or resets the selected date to whatever number you enter. Your entry can be positive, negative, or zero. Here the usual mathematical convention is followed—numbers without an explicit sign are considered to be positive. The new selected date takes effect immediately, and the main window highlighting is updated (if necessary) even though that window is in the background. However, there is no automatic jumping to the new selected date. You still need to use the Jump to Selected menu item for that.
The number you enter for the Julian Day does not have to end in .5 (which corresponds to midnight on the prime meridian). If it does not, the program automatically adjusts your entry to the preceding midnight.
Setting the state of the program such that there is no selected date (by clicking on a blank box in the main window’s month calendar pane) has no effect on the date window. Thus it is more accurate to say that the date window shows the most recently selected date. I thought about ensuring that the date window is closed when there is no selected date, and also of disabling the Show Date Window option in the Options menu. That seemed to me to be the most rational approach. But reading the Macintosh user interface guidelines made me think that such an arrangement violates the guidelines. User feedback on this subject is welcome.
When active, the date window can be closed by clicking on its close box or by using the Close command on the File menu. If it is entirely surrounded by the main window, it can be hidden by activating the main window.
4.4.2. Holidays…
The Holidays option brings up a modal dialog box which lets the user determine which of the implemented holidays should be highlighted. (The highlighting scheme was described earlier.) The dialog box contains three columns (one each for Christian, Jewish, and Islamic). Within each column there are three radio buttons and a group of check boxes. If the “All ” button is on, every implemented holiday for that religion will be highlighted. If the “None” button is on, none of them will be highlighted. If the “Checked…” button is on, the check box group is active and individual holidays may be selected or deselected for highlighting. Unless the “Checked” button is on, the check boxes are deactivated and their settings are ignored by the program. Their values are not updated by clicking on any radio button. This behavior differs noticeably from the behavior of the check boxes in InterCal Versions 1.0 and 1.1. Clicking on OK accepts the new settings. Cancel closes the box without updating the old set of selections.
Regardless of the user’s settings, holidays are not highlighted in the following cases:
1) Christian holidays/holy days in the B.C. era;
2) Jewish holidays/holy days in the B.W. era;
3) Islamic holidays/holy days in the B.H. era.
Some holidays/festivals/observances last for several days or, in the case of Ramadan, an entire month. In such cases, only the first day is highlighted.
The dates of Christmas and Epiphany are calculated in the Western Historical calendar. That is, the Julian calendar dates and rules are used on or before October 4, 1582 A.D. and the Gregorian calendar dates and rules are used after that date. Thus, if your primary calendar is Gregorian in years before 1582, or the Julian in years after 1582, do not be surprised to see Christmas or Epiphany seeming to fall on dates other than December 25 and January 6. I did not bother to have separate Julian and Gregorian choices for these holidays, since they are fixed. Christmas is December 25 and Epiphany is January 6 (Julian in Orthodox Christian churches; Gregorian otherwise).
I do have separate boxes for Julian and Western Easter and Pentecost. “Western” Easter (used by the Roman Catholic and most Protestant churches) uses the old Julian rules for years 1582 and earlier, and the revised Gregorian rules for years 1583 and later. Eastern Orthodox churches are still using the Julian Calendar to determine the dates of all holidays. So “Julian” Easter permits you to see when the Orthodox churches will celebrate Easter, no matter what the year (and similarly for “Julian” Pentecost). You will probably also want to use Julian Easter for determining the holiday dates in Protestant countries during the years after 1582 but before your country of interest switched to the Gregorian calendar. In years 1582 and earlier, the holidays always collide, so InterCal simply uses one holiday label—”Easter” or “Pentecost” as appropriate.
4.4.3 Jump To Selected
Selecting Jump To Selected causes displayed date to be reset (if necessary) to selected date. If there is no selected date, this menu item is disabled.
4.4.4 Return To Today
Selecting Return To Today causes displayed date to be reset (if necessary) to today’s date.
4.4.5 Reverse Calendars
Selecting Reverse Calendars switches the roles of the primary and secondary systems. The former primary system becomes the secondary, and vice versa. This item is disabled if there is no secondary system active. Since the months rarely overlap exactly, there have to be some rules for determining which month in the new primary system is displayed. The same rules are used as when a new primary system is chosen under the Primary menu (see §4.3).
4.4.6. Mayan Correlations…
Selecting Mayan Correlations… brings up the Mayan correlations window. This is a non-modal dialog which permits the user to select a correlation from among a number of published suggested correlations, or to specify his/her own. (A correlation is a correspondence between Long Count 0.0.0.0.0 and a particular Julian Day.) It contains a set of radio buttons. Text describes each correlation (name of archaeologist who suggested it; Julian Day number of 0.0.0.0.0, Julian calendar date of 0.0.0.0.0, and Gregorian calendar date of 0.0.0.0.0.) The uppermost radio button, if selected, activates an editable text box in which the user can enter any Julian Day number desired. All Mayan dates active in the program are updated immediately upon the clicking of any radio button, or upon completion of editing of the user-choice field. Note that the Julian day number of the dates is not changed—only the derived Long Count, Tzolkin, and Haab dates.
This command is disabled if any part of the window is visible on the desktop, since the window can then be activated simply by clicking on it. The window may be closed when it is active by clicking on its close box or by using the Close command on the File menu. If it is completely surrounded by the main window and/or the date window, it may be hidden by activating the main window. The window may be resized and repositioned.
5. LIMITATIONS
5.1. Year and Julian Day Ranges
In order to be accurate, the calendar calculations must be performed using integer arithmetic. Since the basic unit is the day, InterCal is limited to dates for which the integer part of the Julian Day can fit into a signed 32-bit integer. Validity checking is performed on the Julian Day box in the Date Window, the year box in the main window, and various other editable text fields, to try to prevent such dates from occurring. I tried to set the limits a little narrower than actually required. However, the logic is complex in places and the limits on Julian Day numbers and years are not perfectly consistent. Also, it is possible (through use of the arrow buttons on months and years) to defeat the text validation code. If any of these things happens, InterCal should not crash, but will produce some garbage results or may put up an alert box when you don’t expect it. The validation code will not allow the absolute value of Julian Day entries to exceed 2,145,000,000 or the absolute value of year entries to exceed 5,850,000.
5.2 Excess Holiday Collisions
On very rare occasions, three holidays (one Christian, one Jewish, one Islamic) all occur on the same day. It is even theoretically possible for four to collide (both Easters plus a Jewish and an Islamic holiday), although I do not know if such a thing actually happens. Since screen space is limited, since I did not want to induce eye strain in the user, and since triple (or greater) collisions are so rare, I decided not to adjust box sizes or fonts to ensure that the names of all holidays would fit into the same box. Instead, when this happens, holiday names overflow into the box below, marring the appearance of the display. If a triple collision occurs on the bottom row of the display, the title of the third holiday will be partially clipped by the window boundary.
6. KNOWN PROBLEMS
6.1. Exceeding the Long Integer Limit
Instead of relying on crude validation limits on the entered year or Julian Day, InterCal ought to check for the overflow, raise an exception, and issue a warning to the user. Then only actual violations would prevent successful execution, and the user would never see an unexpected year alert box when he has just entered a Julian Day. Unfortunately, there appears to be no mechanism on the Macintosh (at least using C++) to detect the overflow.
6.2. Improperly Displayed Popups
Sometimes popup menus in the displayed date controls will be truncated at the right. Also, sometimes the popup menus (when activated) appear in 12-point type (the program tries to display then in 24-point). These popup size problems appear to me to be bugs in the Symantec Visual Architect code which initializes the popup menus. At seemingly unpredictable times (but always during startup), it sizes them using the system font instead of the actual font specified in my code. This bug has been reported to Symantec. The problem usually goes away if you simply quit and restart the program. An attempted workaround for this problem was put into Version 1.2. It reduced the frequency of occurrence of this problem, but did not completely eliminate it.
The mark character, which shows which popup item is currently selected, is not properly displayed. This problem also appears to be either a bug or a feature of the Visual Architect code. I know of no work around.